package service.impl;

import dao.NewsDao;
import factory.SimpleDaoFactory;
import pojo.News;
import service.NewsService;

public class NewsServiceimpl implements NewsService {
    private NewsDao dao;
    //    private NewsDao dao= SimpleDaoFactory.getInstance();

    public void setDao(NewsDao dao) {
        this.dao = dao;
    }

    public void addNews(News news) {
        dao.save(news);
    }

    @Override
    public void save(News news) {
        dao.save(news);
    }
}
